﻿using System;
using System.ComponentModel;

namespace Microsoft.Services.Clab.UI.Mvvmc
{
    public interface IController : INotifyPropertyChanged, IDisposable
    {
        Guid ControllerId { get; }

        void Initialize(IController parentController, object initParameters);

        KeyValueCollection InitParameters { get; }

        string[] ActionNames { get; }

        void DoStartupAction();

        void DoAction(string actionName, params object[] actionParameters);
        bool CanDoAction(string actionName, params object[] actionParameters);
        bool ExistsAction(string actionName);
        bool TryDoAction(string actionName, params object[] actionParameters);

        string LogicalName { get; set; }

        IController ParentController { get; }

        ControllerCollection ChildControllers { get; }

        IViewModel ViewModel { get; }

        ControllerState State { get; }

        KeyValueCollection CustomPropertyBag { get; }

        void UnloadView(IView view);
    }
}
